package com.fizzkai.service.impl;

import com.fizzkai.domain.User;
import com.fizzkai.mapper.UserMapper;
import com.fizzkai.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author weijh3
 * @Date 2018/11/26 下午6:27
 * @Version 1.0
 **/
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public void add(User user) {
        userMapper.addOne(user);
    }

    @Override
    public List<User> queryAll() {
        return userMapper.findAll();
    }

    @Override
    public Object get(Long id) {
        return userMapper.get(id);
    }

    @Override
    public List<User> testIn(Long min, Long max) {
        return userMapper.testIn(min, max);
    }
}
